<?php

require __DIR__ . '/../../vendor/autoload.php';

$queue = new \SuperTool\FileQueue([
	'databaseRoot' => './file-queue/test' //设置文件存储路径,没有会自动创建
]);

foreach(range(1,1000) as $i) {
    $queue->push('list',$i);
}

echo "删除list之前: " . $queue->getCount('list') . "\n";
// 删除所有数据
$queue->removeAll();
echo "删除list之后: " . $queue->getCount('list') . "\n";

$queue->push('name', 'jlb');
echo "name: " . $queue->pop('name') . "\n";
$queue->remove('name');